package com.marketingexpert.controller.messagemgnt;

import java.util.Iterator;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.marketingexpert.service.messagemgnt.MessageService;
import com.marketingexpert.service.messagemgnt.TaskService;

public class DeleteDraftController implements Controller {

	private TaskService taskService = null;
	
	private MessageService messageService;
	
	private String successView;
	
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse arg1) throws Exception {
		String[] draftIds = request.getParameterValues("draftIds");
		
		taskService.batchDeleteTask(draftIds);
		
		return new ModelAndView(getSuccessView());
		
	}

	

	public TaskService getTaskService() {
		return taskService;
	}



	public void setTaskService(TaskService taskService) {
		this.taskService = taskService;
	}



	public String getSuccessView() {
		return successView;
	}

	public void setSuccessView(String successView) {
		this.successView = successView;
	}

	public MessageService getMessageService() {
		return messageService;
	}

	public void setMessageService(MessageService messageService) {
		this.messageService = messageService;
	}

	
	
}
